// 系统配置模块路由
import { DEFAULT_LAYOUT } from '../base';
import { AppRouteRecordRaw } from '../types';

const SYSTEM: AppRouteRecordRaw = {
  path: '/system',
  name: '系统配置',
  component: DEFAULT_LAYOUT,
  meta: {
    locale: 'menu.system',
    requiresAuth: true,
    ignoreCache: false,
    icon: 'icon-tool',
    roles: ['*'],
    order: 9,
  },
  children: [
    // 立体库维护
    {
      path: '/stereoscopic-library',
      name: '立体库维护',
      component: () =>
        import('@/views/system/list/stereoscopic-library/index.vue'),
      meta: {
        locale: 'menu.stereoscopicLibrary',
        requiresAuth: true,
        ignoreCache: false,
        roles: ['*'],
      },
    },
    // 配送小车维护
    {
      path: '/delivery-trolley',
      name: '料车维护',
      component: () => import('@/views/system/list/delivery-trolley/index.vue'),
      meta: {
        locale: 'menu.deliveryTrolley',
        requiresAuth: true,
        ignoreCache: false,
        roles: ['*'],
      },
    },
    // 工作包器具维护
    {
      path: '/tool-kit',
      name: '工作包器具维护',
      component: () => import('@/views/system/list/tool-kit/index.vue'),
      meta: {
        locale: 'menu.toolKit',
        requiresAuth: true,
        ignoreCache: false,
        roles: ['*'],
      },
    },
    // 工作包物料维护
    {
      path: '/tool-material',
      name: '工作包物料维护',
      component: () => import('@/views/system/list/tool-material/index.vue'),
      meta: {
        locale: 'menu.toolMaterial',
        requiresAuth: true,
        ignoreCache: false,
        roles: ['*'],
      },
    },
    // 缓存料箱维护
    {
      path: '/buffer-bin',
      name: '缓存料箱维护',
      component: () => import('@/views/system/list/buffer-bin/index.vue'),
      meta: {
        locale: 'menu.bufferBin',
        requiresAuth: true,
        ignoreCache: false,
        roles: ['*'],
      },
    },
    // 缓存料箱物料维护
    {
      path: '/bin-material',
      name: '缓存料箱物料维护',
      component: () => import('@/views/system/list/bin-material/index.vue'),
      meta: {
        locale: 'menu.binMaterial',
        requiresAuth: true,
        ignoreCache: false,
        roles: ['*'],
      },
    },
    // 大件区货架维护
    {
      path: '/large-goods-shelves',
      name: '大件区货架维护',
      component: () =>
        import('@/views/system/list/large-goods-shelves/index.vue'),
      meta: {
        locale: 'menu.largeGoodsShelves',
        requiresAuth: true,
        ignoreCache: false,
        roles: ['*'],
      },
    },
    // 大件区物料维护
    {
      path: '/large-goods-material',
      name: '大件区物料维护',
      component: () =>
        import('@/views/system/list/large-goods-material/index.vue'),
      meta: {
        locale: 'menu.largeGoodsMaterial',
        requiresAuth: true,
        ignoreCache: false,
        roles: ['*'],
      },
    },
    // 立体库集成
    {
      path: '/wcs-interface',
      name: '立体库集成',
      component: () => import('@/views/system/list/wcs-interface/index.vue'),
      meta: {
        locale: 'menu.wcsInterface',
        requiresAuth: true,
        ignoreCache: false,
        roles: ['*'],
      },
    },
    // 日志查询
    {
      path: '/log-search',
      name: '日志查询',
      component: () => import('@/views/system/list/log-search/index.vue'),
      meta: {
        locale: 'menu.logSearch',
        requiresAuth: true,
        ignoreCache: false,
        roles: ['*'],
      },
    },
    // 操作台信息维护
    {
      path: '/sorting-table',
      name: '操作台信息维护',
      component: () => import('@/views/system/list/sorting-table/index.vue'),
      meta: {
        locale: 'menu.sortingTable',
        requiresAuth: true,
        ignoreCache: false,
        roles: ['*'],
      },
    },
    // 配送员信息维护
    {
      path: '/delivery-person',
      name: '配送员信息维护',
      component: () => import('@/views/system/list/delivery-person/index.vue'),
      meta: {
        locale: 'menu.deliveryPerson',
        requiresAuth: true,
        ignoreCache: false,
        roles: ['*'],
      },
    },

    // 巷道维护
    {
      path: '/road-manage',
      name: '巷道维护',
      component: () => import('@/views/system/list/road-manage/index.vue'),
      meta: {
        locale: 'menu.roadManage',
        requiresAuth: true,
        ignoreCache: false,
        roles: ['*'],
      },
    },
    // 物料维护
    {
      path: '/material-maintenance',
      name: '物料维护',
      component: () =>
        import('@/views/system/list/material-maintenance/index.vue'),
      meta: {
        locale: 'menu.materialMaintenance',
        requiresAuth: true,
        ignoreCache: false,
        roles: ['*'],
      },
    },
    {
      path: '/vehicle-inventory',
      name: '牵引车与母车管理',
      component: () =>
        import('@/views/system/list/vehicle-inventory/index.vue'),
      meta: {
        locale: 'menu.vehicleInventory',
        requiresAuth: true,
        ignoreCache: false,
        roles: ['*'],
      },
    },
    {
      path: '/agv-location',
      name: 'AGV调度库位管理',
      component: () => import('@/views/system/list/agv-location/index.vue'),
      meta: {
        locale: 'menu.agvLocation',
        requiresAuth: true,
        ignoreCache: false,
        roles: ['*'],
      },
    },
  ],
};

export default SYSTEM;
